package com.freemyleft.left.left_app.mian.index.my.base_setting;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.freemyleft.left.left_app.R;
import com.freemyleft.left.left_app.R2;
import com.freemyleft.left.left_app.launcher.SignUpDelegate;
import com.freemyleft.left.left_app.mian.index.my.base_setting.certification.CertificationDelegate;
import com.freemyleft.left.left_app.mian.index.my.base_setting.help.HelpDelegate;
import com.freemyleft.left.zapp.delegates.LeftDelegate;
import com.freemyleft.left.zapp.util.LeftPreference;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 设置
 */
public class SettingDelegate extends LeftDelegate {
    //我要认证
    @OnClick(R2.id.tv_certiflcation)
    void certiflcation(){ start(new CertificationDelegate());
    }
    @OnClick(R2.id.bind_Phone_namer)
    void bindPhoneNamber (){
        start(new BindPhoneNumberDelegate());
    }
    @OnClick(R2.id.tv_contat_service)
    void contatService(){
        start(new ContactServicDelegate());
    }
    @OnClick(R2.id.tv_helpe)
    void onHelpe(){
        start(new HelpDelegate());
    }
    @OnClick(R2.id.btn_exit_login)
    void exitLogin(){
        //清除用户数据
        LeftPreference.removeAppProfile();
        LeftPreference.clearAppPreferences();
        getSupportDelegate().start(new SignUpDelegate());
    }

    @Override
    public Object setLayout() {
        return R.layout.delegate_my_base_setting;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View rootView) {

    }
}
